export default {
    state: {
    	// 网络状态改变
    	netWorkChange: true,
		//当前网络状态
		netWorkType:'none'
    },
    mutations: {
    	// 改变网络状态
    	changeNetWork(state, status) {
    		state.netWorkChange = status;
    	},
		setNetWorkType(state, status){
			state.netWorkType = status;
		}
    },
    getters: {
    	// 获取网络状态
    	netWorkStatus(state, getters) {
    		return state.netWorkChange;
    	},
		// 获取当前连接网络资源
		netWorkType(state, getters) {
			return state.netWorkType;
		},
    },
	actions: {
	    changeNetWork (context,state) {
	      context.commit('changeNetWork',state)
	    },
		setNetWorkType (context,state) {
		  context.commit('setNetWorkType',state)
		}
	}	
}